package com.rfsp.common.controller;

import com.rfsp.common.base.BaseController;
import com.rfsp.common.cache.ParamCache;
import com.rfsp.common.service.ParamService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


@Profile("prod")
@Controller
public class IndexController extends BaseController {
	
	@Autowired
	ParamService paramService;

	@RequestMapping("/")
	public ModelAndView index(ModelMap model) {
		//0生产//1测试
//		if("0".equals(paramService.getCacheValue(ParamCache.ENV))) {
//			return redirectView("/error/notLogin");
//		}
//		return new ModelAndView("/index");

		return new ModelAndView("/error/notLogin");
	}
}
